Question about QUERY_STRING redirects with mod_rewrite
am 09.02.2010 20:00:09 von Tiago Marques--0016e65b61cc05822f047f2f88b2
Content-Type: text/plain; charset=UTF-8
Hi,
I'm trying to do 301 redirects from a website which used queries extensively
but doesn't use any now. I found this piece of code but it doesn't seem to
work.
RewriteEngine on
RewriteCond %{QUERY_STRING} ^id=13$
RewriteRule ^/page.php$ http://www.example.com/newname.htm? [L,R=301]
All the examples I found are very similar to this one but I can't get any of
them to work, it simply keeps the ?id=13 part and doesn't rewrite the url.
Am I doing anything wrong or has something changed from one mod_rewrite
revision to another?
Best regards,
Tiago Marques
--0016e65b61cc05822f047f2f88b2
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
website which used queries extensively but doesn't use any now. I foun=
d this piece of code but it doesn't seem to work.
px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-=
left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex=
; ">
RewriteEngine on =3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.=
8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-=
left-style: solid; padding-left: 1ex; ">
RewriteCond %{QUERY_STRING} ^id=3D13$ l_quote" style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; m=
argin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204,=
204); border-left-style: solid; padding-left: 1ex; ">
RewriteRule ^/page.php$ http=
://www.example.com/newname.htm? [L,R=3D301]
get any of them to work, it simply keeps the ?id=3D13 part and doesn't =
rewrite the url.
e revision to another?
go Marques
--0016e65b61cc05822f047f2f88b2--